package com.gap.religion;

import com.buanalintas.framework.Dictionary;
import com.gap.entities.GapMasterReligion;
import com.buanalintas.framework.Field;
import com.buanalintas.framework.Page;

/**
 *
 * Class Religion is ...
 *
 * Generated on Wed Jan 07 10:52:06 ICT 2015
 *
 * @version 1.0
 * @author  Mr. Kazao™
 * @since   Bynga 1.0
 *
 */
public class Religion extends Page {

    
    private Field religionId;
    
    private Field religionName;
    
    private Field religionDescription;
    

    public Religion() {
        super();

        setTheClass(GapMasterReligion.class);
        
        
        
        
        religionId = new Field();
        religionId.setName("religionId");
        religionId.setCaption("id");
        //religionId.setInfo("religion id");
        religionId.setListProperties(" align=\"left\" width=\"1%\" nowrap");
        religionId.setInputProperties(" size=\"20\"");        
        getFields().add(religionId);
        
        religionName = new Field();
        religionName.setName("religionName");
        religionName.setCaption("name");
        religionName.setRequired(true);
        religionName.setListProperties(" align=\"left\" width=\"40%\" nowrap");
        religionName.setInputProperties(" size=\"20\"");        
        getFields().add(religionName);
        
        religionDescription = new Field();
        religionDescription.setName("religionDescription");
        religionDescription.setCaption("description");
        //religionDescription.setInfo("religion description");
        religionDescription.setListProperties(" align=\"left\" width=\"60%\" nowrap");
        religionDescription.setInputProperties(" size=\"20\"");        
        getFields().add(religionDescription);
        

        fillFields();
        getFieldsAdd().remove(religionId);
        getFieldsEdit().remove(religionId);
        getFieldsList().remove(religionId);
        
        setExportList(getClass().getResourceAsStream("ReligionList.jasper"));
        setExport(getClass().getResourceAsStream("Religion.jasper"));
    }
    
    @Override
    public void beforeExport() {
        getExportParams().put("title", Dictionary.getValue(this, "Religion"));
    }

    @Override
    public void beforeExportMulti() {
        beforeExport();
    }
}
